Optimal. Leaf size=44 \[ \frac {(B-C) \tan (c+d x)}{a d (\sec (c+d x)+1)}+\frac {C \tanh ^{-1}(\sin (c+d x))}{a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {4050, 3770, 12, 3794} \[ \frac {(B-C) \tan (c+d x)}{a d (\sec (c+d x)+1)}+\frac {C \tanh ^{-1}(\sin (c+d x))}{a d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 3770
Rule 3794
Rule 4050
Rubi steps
\begin {align*} \int \frac {B \sec (c+d x)+C \sec ^2(c+d x)}{a+a \sec (c+d x)} \, dx &=\frac {\int \frac {(a B-a C) \sec (c+d x)}{a+a \sec (c+d x)} \, dx}{a}+\frac {C \int \sec (c+d x) \, dx}{a}\\ &=\frac {C \tanh ^{-1}(\sin (c+d x))}{a d}+(B-C) \int \frac {\sec (c+d x)}{a+a \sec (c+d x)} \, dx\\ &=\frac {C \tanh ^{-1}(\sin (c+d x))}{a d}+\frac {(B-C) \tan (c+d x)}{d (a+a \sec (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.22, size = 106, normalized size = 2.41 \[ \frac {2 \cos \left (\frac {1}{2} (c+d x)\right ) \left ((B-C) \sin \left (\frac {1}{2} (c+d x)\right )+C \cos \left (\frac {1}{2} (c+d x)\right ) \left (\log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )\right )}{a d (\cos (c+d x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 74, normalized size = 1.68 \[ \frac {{\left (C \cos \left (d x + c\right ) + C\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (C \cos \left (d x + c\right ) + C\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (B - C\right )} \sin \left (d x + c\right )}{2 \, {\left (a d \cos \left (d x + c\right ) + a d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.30, size = 70, normalized size = 1.59 \[ \frac {\frac {C \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a} - \frac {C \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a} + \frac {B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.83, size = 78, normalized size = 1.77 \[ \frac {B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}-\frac {C \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) C}{a d}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) C}{a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.34, size = 99, normalized size = 2.25 \[ \frac {C {\left (\frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a} - \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a} - \frac {\sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}\right )} + \frac {B \sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.83, size = 41, normalized size = 0.93 \[ \frac {2\,C\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a\,d}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (B-C\right )}{a\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {B \sec {\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx + \int \frac {C \sec ^{2}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________